package com.bnyy.quickstart;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;

import java.util.Date;

public class AutomatedDataDelegate implements JavaDelegate {

    public void execute(DelegateExecution execution) {
        Date now = new Date();
        //显示设置的程序变量。在这个示例中，变量 autoWelcomeTime 为当前时间。
        execution.setVariable("autoWelcomeTime", now);
        //显示检索的程序变量
        System.out.println("Faux call to backend for ["
                + execution.getVariable("fullName") + "]");
    }
}
